-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tapchannel: send+recv chunks of the input proof to stay under max msg limit #1259
Conversation
4e09c15
to
d0ab7dc
Compare
Pull Request Test Coverage Report for Build 12411616736Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Thanks for the quick bug fix.
What's the backward compatibility here? I assume channel funding would just result in an error (or timeout) if an rc3 client attempts to open with an rc2 one?
Sounds good to me, just thinking aloud.
@@ -237,6 +319,8 @@ type AssetFundingCreated struct { | |||
// funding output to be able to create the aux funding+commitment | |||
// blobs. | |||
FundingOutputs tlv.RecordT[tlv.TlvType1, AssetOutputListRecord] | |||
|
|||
// TODO(roasbeef): need to chunk this?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say no, or not yet. We currently only allow 3 asset IDs to be committed to a channel (maxNumAssetIDs
). And because the proofs for this output should be quite small (only one on-chain funding output and a change output), and only proof suffixes, I doubt we'd get up to 64k.
Yeah if rc2 opens with rc3, there'd be an error/timeout as the verifier now relies on reading that |
Btw, the |
d0ab7dc
to
3ce6641
Compare
Pushed up a new version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
We could add itest coverage including an input proof that is > 60k bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending other review comments 🎉
Before this change, at times the Tag would be too large, or the asset type an unknown value.
This will be used to chunk up proofs that are too large into smaller chunks for reassembly on the other side.
In this commit, we add functions to chunk and unchunk a proof file. Given a chunk size, we'll split up the proof into smaller components, along with a hash digest for authentication verification and tracking. On the other side, we'll collect all the chunks, check the digest, and finally decode the chunk itself. Property based tests are also added for both the positive and the negative cases.
In this commit, we start to send+recv chunks of the input proofs. This ensures that if a suffix proof is larger than the `lnwire` message size, then we'll be able to still send+recv it.
3ce6641
to
afce88e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
良さそうだ ✅
In this PR, we start to send+recv chunks of the input proofs. This
ensures that if a suffix proof is larger than the
lnwire
message size,then we'll be able to still send+recv it
Fixes #1250